﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MT.eVotePRS.Presentation
{
    public class MTUserControl : System.Windows.Forms.UserControl
    {
        private IController _currentController;

        public MTUserControl()
        {
        }

        public IController CurrentController
        {
            get
            {
                return _currentController;
            }

            set
            {
                for (int i = 0; i < this.Controls.Count; i++)
                {
                    if (this.Controls[i] is MTUserControl)
                    {
                        ((MTUserControl)this.Controls[i]).CurrentController = value;
                    }
                }
                this._currentController = value;
            }
        }

        public bool IsRequestCurrentView
        {
            get { return (_currentController != null); }
        }
    }
}
